package com.zhangkang.stock.stocklib.data

/**
 * @author : Android-张康
 * created on: 2023/5/4 13:49
 * description:
 */
data class StockInfo(
    val stockCode: String,
    val stockName: String,
    val kLineList: List<KLineInfo>
)

data class KLineInfo(
    val date: Int,
    /**
     * 开盘价
     */
    val openPrice: Float,
    /**
     * 收盘价
     */
    val closePrice: Float,
    /**
     * 最高价
     */
    val highPrice: Float,
    /**
     * 最低价
     */
    val lowerPrice: Float,
    /**
     * 涨跌幅
     */
    val upOrDown: Float,
    /**
     * ma5 值
     */
    val ma5: Float = -1F,
    /**
     * ma10 值
     */
    val ma10: Float = -1F,
    /**
     * ma20 值
     */
    val ma20: Float = -1F,
    /**
     * 除权标识
     */
    val adjustFlag: Boolean = false,
    /**
     * 成交量
     */
    val turnOver: Long,
    /**
     * 成交量 ma5
     */
    val turnoverMa5: Float = 0F,

    /**
     * 成交量 ma10
     */
    val turnoverMa10: Float = 0F,

    /**
     * 成交额
     */
    val volume: Long,

    /**
     * 成交额 ma5
     */
    val volumeMa5: Float = 0F,

    /**
     * 成交额 ma10
     */
    val volumeMa10: Float = 0F,

    /**
     * macd 值
     */
    val macd: MACD,

    val kdj: KDJ,

    val rsiList: Map<Int, RSI>
)

data class MACD(
    val fastEMA: Float,
    val slowEMA: Float,
    val DIF: Float,
    val DEA: Float,
    val MACD: Float,
)

data class KDJ(
    val K: Float,
    val D: Float,
    val J: Float
)

data class RSI(
    val averageIncrease: Float,
    val averageDecline: Float,
    val rsi: Float,
)